<?php
namespace lib;

// use \GatewayWorker\Lib\DbConnection;
// use \GatewayWorker\Lib\Gateway;
//use Workerman\Http\Client as HttpClient;
use think\db\Query;
use think\facade\Db;

/**
 * 
 */
class Parse
{
    /**
	 * 测试调用
	 * @return  array 
	 */
	public function index()
	{
	   $tools = new \lib\Tools();
	   $tools->debug('parse 测试调用',array('test'=>11));
	}
	
	/**
	 * 测试调用数据库
	 * @return  array 
	 */
	public function db()
	{
	    $tools = new \lib\Tools();
	    $config = $tools->getConfig();
	    //var_dump($config['mysql']);
	    Db::setConfig($config['mysql']);
	    $lsit = Db::name('dev_admin')->select()->toArray();
	    $tools->debug('admin信息',$lsit);
	    var_dump($lsit);
	}
}
